<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>SUOYUEの分类</title>

  <link rel="shortcut icon" th:href="@{/images/favicon.ico}" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
  <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>

<!--导航-->
<nav class="gird-header">
  <div class="ui container">
    <div class="ui inverted secondary stackable menu">
      <h2 class="ui olive header item" style="font-family: STSong">SUOYUEのBLOG</h2>
      <a href="#" th:href="@{/}" class="m-item item m-mobile-hide"><i class="home icon"></i><span th:text="#{index.home}">首页</span></a>
      <a href="#" th:href="@{/types/-1}" class="active m-item item m-mobile-hide"><i class="clone outline icon"></i><span th:text="#{index.type}">分类</span></a>
      <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide"><i class="clock icon"></i><span th:text="#{index.time}">时间轴</span></a>
      <a href="#" th:href="@{/message}" class="m-item item m-mobile-hide"><i class="book icon"></i><span th:text="#{index.messages}">留言板</span></a>
      <a href="#" th:href="@{/echarts}" class="m-item item m-mobile-hide"><i class="table icon"></i><span th:text="#{index.echarts}">数据统计</span></a>
      <a href="#" th:href="@{/friends}" class="m-item item m-mobile-hide"><i class="pencil alternate icon"></i><span th:text="#{index.links}">友链</span></a>
      <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide"><i class="info icon"></i><span th:text="#{index.me}">关于我</span></a>
      <div class="right m-item item m-mobile-hide">
        <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
          <div class="ui icon transparent input m-margin-tb-tiny" style="color: white">
            <input style="color: white" type="text" name="query" placeholder="Search....">
            <i onclick="document.forms['search'].submit()" class="search link icon"></i>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!--手机端收起导航栏-->
  <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
    <i class="sidebar icon"></i>
  </a>
</nav>

<!--顶部图片-->
<div class="m-bg-type_outer" style="width: 100%;height: 40%">
  <img src="../static/images/typebg.jpg" th:src="@{/images/typebg.jpg}" alt="" class="ui m-bg image" style="width: 100%;height: 100%">
  <div class="m-bg-class_cover">
    <div class="ui container" style="position: relative ;bottom: -540px;">
      <div class="m-font-size-title m-right-bottom" align="center" style="font-family:'STXingkai'">文章分类</div>
      <div class="m-font-size-text-init-title m-margin-top" align="center">记忆是一种相聚的方式，放下是一种自由的形式。不必悲伤，不必忧愁，邂逅的回忆都是美好的故事</div>
    </div>
  </div>
</div>

<!--中间内容-->
<div id="waypoint" class="m-margin- animated fadeIn">
  <div class="ui container">
    <!-- 标签信息 -->
    <div class="ui segment m-padded-tb-large m-opacity">
      <div class="ui container" align="center">
        <div class="ui labeled button m-margin-tb-tiny" th:each="type: ${types}">
          <a href="#" th:href="@{/types/{id}(id=${type.id})}" class="ui button animate__slower" th:classappend="${type.id==activeTypeId} ? 'teal animate__heartBeat' "  th:text="${type.name}">好文</a>
          <div class="ui basic left pointing label animate__slower" th:classappend="${type.id==activeTypeId} ? 'teal animate__heartBeat' " th:text="${#arrays.length(type.blogs)}">24</div>
        </div>
      </div>
      <div class="ui middle aligned one column grid">
        <div class="right aligned column">
          共<h2 class="ui orange header m-inline-block m-text-thin" th:text="${#arrays.length(types)}">14</h2>个
        </div>
      </div>
    </div>

    <!--博客内容-->
    <div class="ui top attached teal m-opacity segment" th:each="blog: ${blogs}">
      <div class="ui padded vertical segment m-padded-tb-large">
        <div class="ui middle aligned mobile reversed stackable grid animate__bounceOut animate__slower" >
          <div class="eleven wide column">
            <h3 class="ui header" ><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black" th:text="${blog.title}">大圣，此去欲何?</a></h3>
            <p class="m-text" th:text="${blog.description}">戴上金箍，没法爱你；放下金箍，没法保护你。我知道上天不会给我第二次机会，曾经我们说好的永远，原来也仅仅只有，十二画，而已。“大圣，此去欲何?”“踏南天，碎凌霄。”“若一去不回……”“便一去不回” 其实很多时候，我们都是有机会的，最后真正放弃的，是我们自己。......</p>
            <!--记录标签-->
            <div class="ui grid m-margin-top-max">
              <div class="eleven wide column">
                <div class="ui mini horizontal link list">
                  <div class="item">
                    <img src="../static/images/me.jpg" th:src="${blog.avatar}" alt="" class="ui avatar image">
                    <div class="content"><a href="#" th:href="@{/about}" target="_blank" class="header" th:text="${blog.nickname}">oneStar</a></div>
                  </div>
                  <div class="item">
                    <i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyy-MM-dd HH:mm')}">2020-01-01</span>
                  </div>
                  <div class="item">
                    <i class="eye icon"></i> <span th:text="${blog.views}">2222</span>
                  </div>
                  <div class="item">
                    <i class="comment outline icon"></i> <span th:text="${blog.commentCount}">2222</span>
                  </div>
                </div>
              </div>
              <div class="right aligned five wide column">
                <a href=" " class="ui teal basic label m-padded-tiny m-text-thin" th:text="${blog.typeName}">好文</a>
              </div>
            </div>
          </div>

          <div class="five wide column ">
            <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
              <img src="../static/images/backimg1.jpg" th:src="${blog.firstPicture}" alt="" class="ui rounded image">
            </a>
          </div>

        </div>
      </div>
    </div>

    <!--分页-->
    <div class="ui bottom attached segment m-opacity stackable grid">
      <div class="three wide column" align="center">
        <a class="item" th:href="@{/types/{id}(id=${activeTypeId},(pageNum=${blogs.pageNum}-1))}">上一页</a>
      </div>

      <div class="ten wide column" align="center">
        <p> <span><span th:text="${blogs.pageNum}"></span> / <span th:text="${blogs.pages}"></span> </p>
      </div>

      <div class="three wide column" align="center">
        <a class="item" th:href="@{/types/{id}(id=${activeTypeId},(pageNum=${blogs.pageNum}+1))}" >下一页</a>
      </div>
    </div>

  </div>
</div>

<br>
<br>


<!--右下角-侧边栏-->
<div id="toolbar" class="m-padded m-fixed m-right-bottom" style="display: none">
  <div class="ui vertical icon buttons ">
    <div id="toTop-button" class="ui icon button" ><i class="chevron up icon"></i></div>
  </div>
</div>

<!--底部栏-->
<footer class="ui inverted vertical segment m-padded-tb-massive m-opacity" th:replace="_fragments :: footer">
</footer>
<!--通用script：使用div标签或thymeleaf模板的th:block-->
<th:block th:replace="_fragments :: script">
</th:block>

<script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
<script src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>

<script>

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    //右下角点击滚上去事件
    $('#toTop-button').click(function () {
      $(window).scrollTo(0,500);
    });
    //滚动侦测
    var waypoint = new Waypoint({
      element: document.getElementById('waypoint'),
      handler: function(direction) {
        if (direction == 'down') {
          $('#toolbar').show(100);
        } else {
          $('#toolbar').hide(500);
        }
        console.log('Scrolled to waypoint!  ' + direction);
      }
    })

</script>

<!--雪花效果-->
<script src="http://www.lmlblog.com/winter/templets/xq/js/snowy.js"></script>
<script src="http://www.lmlblog.com/blog/12/js/Snow.js"></script>
<style type="text/css">
  .snow-container{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100001;}
</style>
<div class="snow-container"><canvas width="1349" height="657"></canvas></div>

<!--看板娘-->
<!--第一种多人物的看板娘，缓存慢-->
<!--<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js"></script>
<!--&lt;!&ndash;第二种一个人物的看板娘，缓存快&ndash;&gt;-->
<!--<script src="https://cdn.jsdelivr.net/npm/live2d-widget@3.0.4/lib/L2Dwidget.min.js"></script>-->
<!--<script type="text/javascript">-->
<!--    L2Dwidget.init({-->

<!--        "display": {-->
<!--            "position": "right", // 定位位置（"left"/"right"/"top"/"bottom"）-->
<!--            "width": 105, // 宽度-->
<!--            "height": 170, // 高度-->
<!--            "hOffset": 0,-->
<!--            "vOffset": 0-->
<!--        },-->
<!--        "mobile": {-->
<!--            "show": true,-->
<!--            "scale": 0.5-->
<!--        },-->
<!--        "react": {-->
<!--            "opacityDefault": 1, // 透明度-->
<!--            "opacityOnHover": 0.8-->
<!--        },-->

<!--        "dialog":{-->
<!--            enable:true,-->
<!--            script:{-->
<!--                'tap body':'2',-->
<!--                'tap face':'3',-->
<!--            }-->
<!--        }-->

<!--    });-->

<!--</script>-->

<!--看板娘-自定义-->
<div id="waifu" class="cartoon">
  <div id="waifu-tips" class="cartoonText">好久不见，日子过得好快呢……</div>
  <canvas id="live2d" width="800" height="800" class="cartoonCan"></canvas>
  <div id="waifu-tool">
    <span class="fa fa-lg fa-comment"></span>
    <span class="fa fa-lg fa-paper-plane"></span>
    <span class="fa fa-lg fa-user-circle"></span>
    <span class="fa fa-lg fa-street-view"></span>
    <span class="fa fa-lg fa-camera-retro"></span>
    <span class="fa fa-lg fa-info-circle"></span>
    <span class="fa fa-lg fa-times"></span>
  </div>
</div>

</body>
</html>